import request from '@/utils/request'

// 查询产品软件包文件列表
export function listProductSoftwarePackage(query) {
  return request({
    url: '/produce/product-software-package/list',
    method: 'get',
    params: query
  })
}

// 查询产品软件包文件详细
export function getProductSoftwarePackage(id) {
  return request({
    url: '/produce/product-software-package/' + id,
    method: 'get'
  })
}

// 新增产品软件包文件
export function addProductSoftwarePackage(data) {
  return request({
    url: '/produce/product-software-package',
    method: 'post',
    data: data
  })
}

// 修改产品软件包文件
export function updateProductSoftwarePackage(data) {
  return request({
    url: '/produce/product-software-package',
    method: 'put',
    data: data
  })
}

// 删除产品软件包文件
export function delProductSoftwarePackage(id) {
  return request({
    url: '/produce/product-software-package/' + id,
    method: 'delete'
  })
}

// 逻辑删除产品软件包文件
export function removedProductSoftwarePackage(id) {
  return request({
    url: '/produce/product-software-package/' + id,
    method: 'delete'
  })
}

//getAll
export function getAll(data) {
    return request({
      url: '/produce/product-software-package/get-all',
      method: 'post',
      data: data
    })
}

// 任务状态修改
export function changeStatus(id, status) {
    return request({
      url: '/produce/product-software-package/change-status',
      method: 'put',
      params:{
        id,status
      },
    })
}